<script type="text/javascript" src="__TEMPLATE__/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="__TEMPLATE__/js/js.js"></script>
<!--<script type="text/javascript" src="__TEMPLATE__/js/user.js"></script>-->
<script>
	$(function(){
		//点击注册登录框外关闭当前注册登录框
		　$(document).bind("click",function(e){
			 var target = $(e.target); 
			 if(target.closest(".login_hide_box").length == 0){
				  $(".login_hide_box").hide(); 
			 } 
			 if(target.closest(".reg_hide_box").length == 0){
				  $(".reg_hide_box").hide();
			 } 
			}) 	
	})	
</script>
<div id="top_dark_box">
		<!-- 中间1200px宽度区域 -->
		<div id="top_dark">
			<a href="__ROOT__"><img src="__TEMPLATE__/images/others/logo.jpg" id="logo" /></a>
			<!-- 导航菜单 -->
			<ul id="menu">
				<li>
					<a href="__ROOT__">首页</a>
				</li>
				<channel>
				<li>
					<a href="{$field.url}">{$field.cname}</a>
				</li>
				</channel>
			</ul>
			<!-- 导航菜单结束 -->
			<!-- 用户登录 -->
			
			<div id="loginInfo" class='loginInfo'>
				<if value="isset($_SESSION['username'])">
					
					 <span>{$hd.session.username}</span><a href="__ROOT__/index.php/index/user/loginout">退出</a> 
				</if>
				<if value="!isset($_SESSION['username'])">
	
				<a href="javascript:showLoginBox()" class="top_login">用户登录</a>
				<a href="javascript:showRegBox();">注册</a>
			</if>
			</div>
			<!-- 用户登录对应隐藏区域 -->
			<form id="loginForm" action="__ROOT__/index.php/index/user/login" method="post" name="login">
			<div class="login_hide_box">
				<img src="__TEMPLATE__/images/sanjiao.gif" alt="" />
				<div class="middle">
					<p>用户名：</p>
					<input type="text" name="username" class="text" />
					<p>密码：</p>
					<input type="password" name="password" class="text" />
					<input type="submit" value="" class="sub" />
				</div>
				<div class="bottom">
					<a  href="javascript:showRegBox();" class="reg">注册</a>
				</div>
			</div>
			</form>
			
			<!-- 用户注册对应隐藏区域 -->
			<form id="regForm" action="__ROOT__/index.php/index/user/register" method="post" name='register'>	
			<div class="reg_hide_box">
				<img src="__TEMPLATE__/images/sanjiao.gif" alt="" />
				<div class="middle">
					<p>用户名：</p>
					<input type="text" name="username" class="text username" />  <span></span>
					<p>昵称：</p>
					<input type="text" name="nickname" class="text nickname" />  <span></span>
					<p>密码：</p>
					<input type="password" name="passwd" class="text password" />  <span></span>
					<p>确认密码：</p>
					<input type="password" name="pwded" class="text password" />  <span></span>
					<p>验证码：</p>
					<img src="__ROOT__/index.php/index/user/code" id="code" onclick="this.src=this.src + '&' + Math.random()"/>
					<input type="text"  name="verify" class="text password_d" />  <span></span>
					<input type="submit" value="注册" class="sub" />
				</div>
			</div>
			</form>
		</div>
		<!-- 中间1200px宽度区域结束 -->
	</div>
	<!-- 顶部灰色100%区域结束 -->
	
	<!-- 顶部最新消息区域 -->
	<div id="latest_news_box">
		<div id="latest_news">
			<p><span class="title">最新消息：</span>
				文章标题</p>
		</div>
	</div>